In this video we create a simple heap implementation so that we can use malloc and free. It has a lot of room for optimizations but for now it's a simple, straightforward implementation so I can explain pretty much how the heap works. ➤Discord: https://discordapp.com/invite/p2JYhr9 ➤Github: https://github.com/Absurdponcho/PonchoOS/tree/Episode-19-Heap ➤Patreon: https://www.patreon.com/PonchoYT 0:00 Intro 0:21 Starting the Heap Header 3:55 InitializeHeap() 7:44 Testing Initializing the Heap 8:50 malloc() 14:55 Testing malloc 15:23 Split Header Function 19:05 Testing multiple mallocs 19:55 ExpandHeap() 22:49 Combining Segments 25:00 Testing Heap Expansion 25:48 free() 26:55 Testing free 27:43 Conclusion